<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计算属性</title>
	</head>
	<body>
        <div id="app">
            <p>原始字符串: {{ message }}</p>
            <p>计算后的反转字符串: {{ reversedMessage }}</p>
			<p>原始字符串: {{ message1 }}</p>
        </div>
	
		<script src="../../vue.js"></script>
        <script>
            const {ref, computed} = Vue;
        	const vm = Vue.createApp({
        	    setup(){
        	        const message = ref('Hello，Java无难事!');
					const message1 = "ddddddd";
        	        const reversedMessage = computed(() =>
        	            message.value.split('').reverse().join('')
        	        );
					
					async function fn(){
						let a = await Promise.resolve(1)  
						let b = await Promise.resolve(2)
						return a+b  
					}
					let tt = fn().then(v=> console.log("v = ",v))
					


        	        return {
        	            message,
        	            reversedMessage,
						message1
        	        }
        	    }
        	}).mount('#app');
        </script>
	</body>
</html>